﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NFinal.Extension
{
    public static class ActionExtension
    {
        public static void Write(this IAction action,NFinal.Validation.ValidResult result)
        {
            foreach (var r in result)
            {
                action.Write(r.message);
            }
        }
        public static void Write(this IAction action, ObjectContainer obj)
        {
            action.Write(obj.value);
        }
        public static void Write(this IAction action, StringContainer obj)
        {
            action.Write(obj.value);
        }
    }
}
